Micron Document
πŸŽ–οΈGitΠ―Ρ€Π°πŸŽ–οΈ

Node / meshtastic / Meshtastic-Android / files / .github / agents / speckit.brownfield.scan.agent.md

Displaying Rendered β€’ View raw β€’ Download

.github/agents/speckit.brownfield.scan.agent.md aa43fb94dd1959f7528c44cbbbdbd8bbb461bd71 (aa43fb94) Text, 5.53 KB

description: Auto-discover project structure, tech stack, frameworks, and architecture
patterns


<!-- Extension: brownfield -->
<!-- Config: .specify/extensions/brownfield/ -->
Scan Project

Analyze an existing codebase to discover its technology stack, architecture patterns, module structure, and coding conventions. This produces a project profile that the bootstrap command uses to generate tailored spec-kit configuration.

User Input

T282828
$ARGUMENTS

You MUST consider the user input before proceeding (if not empty). The user may specify a subdirectory to scan (e.g., "backend/"), a focus area (e.g., "only frontend"), or request a specific depth of analysis.

Prerequisites

1. Verify the current directory is a git repository
2. Verify this is an existing project with source code (not an empty repo)

Outline

1. Detect tech stack: Identify languages, frameworks, and tools by scanning:

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚ Signal β”‚ What to Check β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚ Languages β”‚ File extensions (T383838.py, T383838.ts, T383838.go, T383838.java, T383838.rs, etc.) and their relative proport… β”‚
β”‚ Package managers β”‚ T383838package.json, T383838requirements.txt, T383838pyproject.toml, T383838go.mod, T383838Cargo.toml, T383838pom.xml,… β”‚
β”‚ Frameworks β”‚ Dependencies in package files (React, Django, Spring, Express, Rails, etc.) β”‚
β”‚ Build tools β”‚ T383838Makefile, T383838webpack.config.js, T383838vite.config.ts, T383838Dockerfile, T383838docker-compose.yml β”‚
β”‚ CI/CD β”‚ T383838.github/workflows/, T383838.gitlab-ci.yml, T383838.circleci/, T383838Jenkinsfile β”‚
β”‚ Testing β”‚ Test directories, test frameworks in dependencies (T383838jest, T383838pytest, T383838go test, T383838JU… β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

2. Analyze architecture: Identify the project's structural patterns:

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚ Pattern β”‚ Indicators β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚ Monolith β”‚ Single source tree, one entry point, shared database config β”‚
β”‚ Monorepo β”‚ Multiple T383838package.json/T383838go.mod files, workspace config, T383838packages/ or T383838apps/ d… β”‚
β”‚ Microservices β”‚ Multiple Dockerfiles, service directories, API gateway config β”‚
β”‚ Frontend + Backend β”‚ Separate T383838client//T383838server/ or T383838frontend//T383838backend/ directories β”‚
β”‚ Library/Package β”‚ T383838setup.py, T383838lib/ directory, published package config β”‚
β”‚ MVC β”‚ T383838models/, T383838views/, T383838controllers/ directories β”‚
β”‚ Layered β”‚ T383838domain/, T383838application/, T383838infrastructure/, T383838presentation/ directories β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

3. Map module structure: For monorepos and multi-module projects:
β€’ Identify each module/package/service and its purpose
β€’ Detect inter-module dependencies (imports, shared types)
β€’ Note module boundaries (what code belongs where)
β€’ Identify shared libraries or utilities

4. Extract conventions: Detect existing coding patterns:
β€’ Naming: File naming (camelCase, kebab-case, snake_case), directory naming
β€’ Branching: Existing branch names and patterns from T383838git branch -a
β€’ Commit style: Recent commit message patterns from T383838git log --oneline -20
β€’ Testing: Test file location (T383838__tests__/, T383838*_test.go, T383838test_*.py), test naming
β€’ Documentation: README structure, inline docs, API docs

5. Detect existing governance: Check for files that indicate existing project standards:
β€’ T383838CONTRIBUTING.md, T383838ARCHITECTURE.md, T383838ADR/ (Architecture Decision Records)
β€’ T383838.editorconfig, linter configs (T383838.eslintrc, T383838.flake8, T383838rustfmt.toml)
β€’ T383838CLAUDE.md, T383838AGENTS.md, T383838.specify/ (existing spec-kit setup)

6. Output project profile:

T282828
# Project Profile

## Tech Stack
| Category | Detected |
|----------|----------|
| **Primary language** | TypeScript (68%), Python (32%) |
| **Frontend** | React 18, Vite, TailwindCSS |
| **Backend** | FastAPI, SQLAlchemy, PostgreSQL |
| **Testing** | Jest (frontend), pytest (backend) |
| **CI/CD** | GitHub Actions |
| **Package manager** | npm (frontend), pip (backend) |

## Architecture
Tff7b72- **Pattern**: Frontend + Backend (separated)
Tff7b72- **Frontend**: Ta5d6ff`client/` β€” React SPA
Tff7b72- **Backend**: Ta5d6ff`server/` β€” FastAPI REST API
Tff7b72- **Database**: PostgreSQL (via SQLAlchemy ORM)

## Module Map
| Module | Path | Purpose | Dependencies |
|--------|------|---------|-------------|
| Frontend | Ta5d6ff`client/` | React SPA | Backend API |
| Backend | Ta5d6ff`server/` | REST API | Database |
| Shared | Ta5d6ff`shared/` | Type definitions | β€” |

## Conventions
Tff7b72- **File naming**: kebab-case (frontend), snake_case (backend)
Tff7b72- **Branch pattern**: Ta5d6ff`feat/*`, Ta5d6ff`fix/*`, Ta5d6ff`chore/*`
Tff7b72- **Commit style**: Conventional Commits
Tff7b72- **Test location**: Ta5d6ff`__tests__/` (frontend), Ta5d6ff`tests/` (backend)

## Existing Governance
Tff7b72- βœ… CONTRIBUTING.md
Tff7b72- βœ… .eslintrc.json
Tff7b72- ❌ ARCHITECTURE.md
Tff7b72- ❌ .specify/ (no spec-kit setup)

## Recommendations
Tff7b72- Run Ta5d6ff`/speckit.brownfield.bootstrap` to generate tailored spec-kit configuration
Tff7b72- Constitution should enforce: kebab-case files (frontend), snake_case (backend)
Tff7b72- Feature specs should map to the frontend/backend split


Rules

β€’ Read-only β€” this command never modifies any files
β€’ Respect .gitignore β€” never scan T383838node_modules/, T383838vendor/, T383838dist/, T383838.venv/, or other ignored directories
β€’ Proportional analysis β€” report language percentages based on actual file counts or line counts
β€’ No assumptions β€” only report what is actually detected in the codebase
β€’ Handle empty results β€” if a category has nothing detected, say "Not detected" rather than guessing

Served by rngit 1.5.2 - Generated in 0.06s